<?php
if(!empty($data)){
    $i=0;
    foreach ($data as $data){
        ++$i;
        echo '
        <div class="product_box left clearfix">
                        <a href="'.base_url().$data->alias.'.8.html">
                        <img class="imgproduct"  src="'.$data->img.'" />
                        <span class="title_product block">'.$data->title.'</span>
                         </a>
                        <span class="price">Giá: '.VndDot($data->price).' VNĐ</span>
                       
        </div>
        ';
        if($i!=0&&$i%4==0){
            echo '<div class="clearfix"></div>';
        }
    }
}
       